#ifndef MONTHSALARYVIEW_H
#define MONTHSALARYVIEW_H

#include <QWidget>
#include <QTableWidget>
#include <QLineEdit>
#include <QPushButton>
#include <QLabel>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QMessageBox>
#include <QComboBox>
#include "adminmanager.h"

class MonthSalaryView : public QWidget
{
    Q_OBJECT
public:
    explicit MonthSalaryView(QWidget *parent = nullptr);
    ~MonthSalaryView();

    void setAdminManager(AdminManager *manager);
    void refreshDepartmentList();
signals:

private slots:
    void onQueryButtonClicked();
    void onOperationResult(bool success, const QString &message);

    void onDistributeSalaryButtonClicked();
    void onDistributeAllSalaryButtonClicked();

private:
    void setupUI();
    void initDepartmentComboBox();

    // UI组件
    QComboBox *monthComboBox;
    QComboBox *departmentComboBox;
    QPushButton *queryButton;
    QTableWidget *resultTable;

    // 业务逻辑
    AdminManager *adminManager;
};

#endif // MONTHSALARYVIEW_H
